#  n = int(input())
#  n = 2**n
#  mod = int(10e9+7)
#  print(n,mod)
#  print(n%mod)
n = int(input())
n = 2**n
mod = 1000000007
print(n%mod)
# Why is this bug so funny???
